package controllers

import (
	"github.com/astaxie/beego"
	"github.com/bugfan/logrus"
	"beego-restful-server/com"
	"beego-restful-server/models"	
	
)
type Auto struct{
	beego.Controller	
}

func (o *Auto) Query() {
	logrus.Println("Query:",o.Ctx.Input.Param(":ext"))
	users:=make([]*models.User,0,10)
	com.NewOrm().QueryTable("user").All(&users)
	logrus.Info(users)
	o.Data["data"]=`{"status":200,"msg":"yes"}`
	o.ServeJSON()
}